package com.sf.proxy.custom.dynamic.jdkcustom;


public class TestMain {
    public static void main(String[] args) {
        try{
            HuangNiuProxy huangNiuProxy = new HuangNiuProxy();
            huangNiuProxy.setObject(new Me());
            Person person = (Person) huangNiuProxy.getProxy();
            System.out.println(person.maipiao("张一"));

            MeiPoProxy meiPoProxy = new MeiPoProxy();
            meiPoProxy.setObject(new Me());
            Male male = (Male) meiPoProxy.getProxy();
            male.likeWoman("嘿嘿");

        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
